From: Ben Hutchings Date: Mon, 15 May 2023 13:58:39 +0000 (+0200) Subject: perf tools: Support EXTRA_CXXFLAGS X-Git-Tag: archive/raspbian/6.19.6-2+rpi1~3^2~6 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com//%22mailto:hjain.itbhu%40gmail.com/%22/%22http:/www.example.com/%22mailto:hjain.itbhu%40gmail.com/%22?a=commitdiff_plain;h=f16b2e933daf839af58171a9ac43e22e9c5e0f99;p=linux.git perf tools: Support EXTRA_CXXFLAGS Add support for an EXTRA_CXXFLAGS variable, used similarly to EXTRA_CFLAGS. Signed-off-by: Ben Hutchings Gbp-Pq: Topic bugfix/all Gbp-Pq: Name perf-tools-support-extra-cxxflags.patch --- diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index d8d25f62aaa..75b76c51b1c 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -18,6 +18,7 @@ detected_var = $(shell echo "$(1)=$($(1))" >> $(OUTPUT).config-detected) CFLAGS := $(EXTRA_CFLAGS) $(filter-out -Wnested-externs,$(EXTRA_WARNINGS)) HOSTCFLAGS := $(filter-out -Wnested-externs,$(EXTRA_WARNINGS)) +CXXFLAGS := $(EXTRA_CXXFLAGS) # This is required because the kernel is built with this and some of the code # borrowed from kernel headers depends on it, e.g. put_unaligned_*(). diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 437229c01eb..98353a1ad8a 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -33,7 +33,7 @@ include ../scripts/utilities.mak # # Define LDFLAGS=-static to build a static binary. # -# Define EXTRA_CFLAGS=-m64 or EXTRA_CFLAGS=-m32 as appropriate for cross-builds. +# Define EXTRA_CFLAGS=-m64 or EXTRA_CFLAGS=-m32 as appropriate for cross-builds, and similarly EXTRA_CXXFLAGS. # # Define EXCLUDE_EXTLIBS=-lmylib to exclude libmylib from the auto-generated # EXTLIBS.